<!DOCTYPE html>
<html ng-app>
	<head>
		<meta charset="UTF-8">
		<title>updateClock</title>
		<script src="https://cdn.bootcss.com/angular.js/1.2.23/angular.min.js"></script>
	</head>
	<body>
		<div id="" ng-controller="MyController">
			<h1>Hello {{clock}}</h1>
		</div>
		<script type="text/javascript">
			function MyController($scope,$timeout){
				var updateClock = function(){
					$scope.clock = new Date();
					$timeout(function(){
						updateClock();
					},1000);
				}
				updateClock();
			}
		</script>
	</body>
</html>
